{layout name="layout" /}

<div class="page-container">
    <form class="form form-horizontal" id="form-article-add" method="POST" enctype="multipart/form-data">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">图片上传：</label>
            <div class="formControls col-xs-8 col-sm-9" id="updiv">
                <input type="file" class="btn radius" id="image" name="image">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">是否生成缩略图：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <div class="radio-box">
                    <input name="isthumb" type="radio" id="sex-1" value="0" checked>
                    <label for="sex-1">不生成</label>
                </div>
                <div class="radio-box">
                    <input name="isthumb" type="radio" id="sex-2" value="1">
                    <label for="sex-2">生成</label>
                </div>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button type="submit" class="btn btn-primary radius">
                    <i class="Hui-iconfont">&#xe632;</i> 上传</button>
                <button type="button" class="btn btn-default radius" onClick="window.history.go(-1);">&nbsp;取&nbsp;&nbsp;消&nbsp;</button>
            </div>
        </div>
    </form>
</div>
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    $("#form-article-add").submit(function () {
        var files = $("#image").val();

        if (files == '') {
            layer.msg("请选择要上传的文件", {
                time: 1000
            });

            return false;
        }
    })
</script>
<!--请在上方写此页面业务相关的脚本-->